home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / midifi1a / form1.frm (.txt) next >
Encoding:
Visual Basic Form  |  1999-10-02  |  2.4 KB  |  81 lines

  1. VERSION 5.00
  2. Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
  3. Object = "{C1A8AF28-1257-101B-8FB0-0020AF039CA3}#1.1#0"; "MCI32.OCX"
  4. Begin VB.Form Form1 
  5.    Caption         =   "Midi Player."
  6.    ClientHeight    =   4410
  7.    ClientLeft      =   60
  8.    ClientTop       =   345
  9.    ClientWidth     =   8565
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   4410
  12.    ScaleWidth      =   8565
  13.    StartUpPosition =   3  'Windows Default
  14.    Begin VB.Timer Timer1 
  15.       Enabled         =   0   'False
  16.       Interval        =   10
  17.       Left            =   7470
  18.       Top             =   855
  19.    End
  20.    Begin VB.ListBox List1 
  21.       Height          =   3960
  22.       Left            =   0
  23.       TabIndex        =   2
  24.       Top             =   0
  25.       Width           =   6765
  26.    End
  27.    Begin MCI.MMControl MMControl1 
  28.       Height          =   510
  29.       Left            =   6795
  30.       TabIndex        =   1
  31.       Top             =   3465
  32.       Width           =   1695
  33.       _ExtentX        =   2990
  34.       _ExtentY        =   900
  35.       _Version        =   327680
  36.       PrevVisible     =   0   'False
  37.       NextVisible     =   0   'False
  38.       BackVisible     =   0   'False
  39.       StepVisible     =   0   'False
  40.       RecordVisible   =   0   'False
  41.       EjectVisible    =   0   'False
  42.       DeviceType      =   "Sequencer"
  43.       FileName        =   ""
  44.    End
  45.    Begin ComctlLib.ProgressBar ProgressBar1 
  46.       Height          =   330
  47.       Left            =   0
  48.       TabIndex        =   0
  49.       Top             =   4050
  50.       Width           =   8520
  51.       _ExtentX        =   15028
  52.       _ExtentY        =   582
  53.       _Version        =   327682
  54.       Appearance      =   1
  55.    End
  56. Attribute VB_Name = "Form1"
  57. Attribute VB_GlobalNameSpace = False
  58. Attribute VB_Creatable = False
  59. Attribute VB_PredeclaredId = True
  60. Attribute VB_Exposed = False
  61. Public Sub PlayMusic(filename As String)
  62. Timer1.Enabled = False
  63. MMControl1.Command = "Stop"
  64. MMControl1.Command = "Close"
  65. MMControl1.filename = filename
  66. MMControl1.Command = "Open"
  67. MMControl1.Command = "Play"
  68. Timer1.Enabled = True
  69. End Sub
  70. Private Sub Form_Unload(Cancel As Integer)
  71. MMControl1.Command = "Stop"
  72. MMControl1.Command = "Close"
  73. End Sub
  74. Private Sub List1_Click()
  75. PlayMusic List1.Text
  76. End Sub
  77. Private Sub Timer1_Timer()
  78. ProgressBar1.Max = MMControl1.Length
  79. ProgressBar1.Value = MMControl1.Position
  80. End Sub
  81.